package com.pm.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.pm.system.mapper.PmGoodsMapper;
import com.pm.system.domain.PmGoods;
import com.pm.system.service.IPmGoodsService;

/**
 * 商品Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-19
 */
@Service
public class PmGoodsServiceImpl implements IPmGoodsService 
{
    @Autowired
    private PmGoodsMapper pmGoodsMapper;

    /**
     * 查询商品
     * 
     * @param id 商品主键
     * @return 商品
     */
    @Override
    public PmGoods selectPmGoodsById(Long id)
    {
        return pmGoodsMapper.selectPmGoodsById(id);
    }

    /**
     * 查询商品列表
     * 
     * @param pmGoods 商品
     * @return 商品
     */
    @Override
    public List<PmGoods> selectPmGoodsList(PmGoods pmGoods)
    {
        return pmGoodsMapper.selectPmGoodsList(pmGoods);
    }

    /**
     * 新增商品
     * 
     * @param pmGoods 商品
     * @return 结果
     */
    @Override
    public int insertPmGoods(PmGoods pmGoods)
    {
        return pmGoodsMapper.insertPmGoods(pmGoods);
    }

    /**
     * 修改商品
     * 
     * @param pmGoods 商品
     * @return 结果
     */
    @Override
    public int updatePmGoods(PmGoods pmGoods)
    {
        return pmGoodsMapper.updatePmGoods(pmGoods);
    }

    /**
     * 批量删除商品
     * 
     * @param ids 需要删除的商品主键
     * @return 结果
     */
    @Override
    public int deletePmGoodsByIds(Long[] ids)
    {
        return pmGoodsMapper.deletePmGoodsByIds(ids);
    }

    /**
     * 删除商品信息
     * 
     * @param id 商品主键
     * @return 结果
     */
    @Override
    public int deletePmGoodsById(Long id)
    {
        return pmGoodsMapper.deletePmGoodsById(id);
    }
}
